/**
 * Created by
 * @Author  Administrator
 * @Date    2016/8/27
 */
var loginBackend = angular.module('loginBackend',[])

loginBackend.controller('loginCtrl',function($scope){
    $scope.username = ''
    $scope.password = ''
    $scope.login = function(){
        console.log("账号："+$scope.username)
        console.log("密码："+$scope.password)
        window.location.href = '/avBackend/src/index.html'
    }
})

loginBackend.directive('ngEnter', function () {
    return function (scope, element, attrs) {
        element.bind("keydown keypress", function (event) {
            if (event.which === 13) {
                scope.$apply(function () {
                    scope.$eval(attrs.ngEnter);
                });
                event.preventDefault();
            }
        });
    };
});